# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=bmd-tools
pkgver=1.0.2
pkgrel=5
pkgdesc="Tools for Blackmagic USB video encoders"
url="https://github.com/fabled/bmd-tools"
arch="all"
license="MIT"
makedepends="libusb-dev"
subpackages="$pkgname-openrc"
source="bmd-tools-$pkgver.tar.gz::https://github.com/fabled/bmd-tools/archive/v$pkgver.tar.gz
	bmd-streamer.initd
	bmd-streamer.confd
	"
options="!check"

build() {
	make
}

package() {
	mkdir -p "$pkgdir"/usr/bin

	install -s -m755 bmd-streamer bmd-extractfw \
		"$pkgdir"/usr/bin

	install -Dm755 "$srcdir"/bmd-streamer.initd "$pkgdir"/etc/init.d/bmd-streamer
	install -Dm644 "$srcdir"/bmd-streamer.confd "$pkgdir"/etc/conf.d/bmd-streamer
}

sha512sums="bcd6375c23541ef65e8cdf9222c94c4d90bf43976524987c0464b8570533efad15f955eac83e60651bc7295493f5f6f4322ac7a326df747ca88b626ad7654265  bmd-tools-1.0.2.tar.gz
158bb596d25be53bfcc9a4c2e678b61304c522124f64812ed7c1168a6b39735f15579999acb2853ee710ba59593ad7a57c970d21dba467096a8d0505af6f4c66  bmd-streamer.initd
e3760e4b9148d9f8467db519ff8ee2a161be1556a56bef9383a3e34a20c5960fff835a68d3e4f4a31b771e861d95f6fc4537fcb53675ac5f89d76b6ad49f8cea  bmd-streamer.confd"
